using System;
using System.IO;
using SolutionFactory.VSTemplateSchema;

namespace SolutionFactory.Services
{
	public class ReplaceSolutionNameWithTokens : IFileVisitor
	{
		private readonly ILogger _logger;
		private readonly IFileTokenReplacer _replacer;

		public ReplaceSolutionNameWithTokens(ILogger logger, IFileTokenReplacer replacer)
		{
			_logger = logger;
			_replacer = replacer;
		}

		public void Visit(FileInfo file)
		{
			_replacer.Replace(file.FullName);
		}
	}
}